package com.aceitunaproject.shared.message.concrete;

import java.util.Date;
import com.aceitunaproject.shared.message.Message;

/**
 * Abstract superclass for methods and properties common to all Message classes
 * @author Federico Bergstein
 *
 */
public class BaseMessage implements Message {

	private static final long serialVersionUID = 1L;
	private Date timeStamp;
	private String id;
	private String type;
	
	public BaseMessage(String type) {
		this.type = type;
	}

	/**
	 * see {@inheritDoc}
	 */
	public Date getTimeStamp() {
		return timeStamp;
	}

	/**
	 * see {@inheritDoc}
	 */
	public String getId() {

		return id;
	}

	/**
	 * see {@inheritDoc}
	 */
	public String getMessageType() {

		return type;
	}

	/**
	 * see {@inheritDoc}
	 */
	public void setId(String id) {

		this.id = id;
	}

	/**
	 * {@inheritDoc}
	 */
	public void setTimeStamp(Date timeStamp) {
		this.timeStamp = timeStamp;
	}

}
